// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

using System;
using ClangSharp.Interop;
using static ClangSharp.Interop.CX_AttrKind;

namespace ClangSharp;

public class Attr : Cursor
{
    private protected Attr(CXCursor handle) : base(handle, handle.Kind)
    {
        if (handle.AttrKind == CX_AttrKind_Invalid)
        {
            throw new ArgumentOutOfRangeException(nameof(handle));
        }
    }

    internal static new Attr Create(CXCursor handle) => handle.AttrKind switch {
        CX_AttrKind_Invalid => new Attr(handle),
        CX_AttrKind_AddressSpace => new Attr(handle),
        CX_AttrKind_Allocating => new Attr(handle),
        CX_AttrKind_AnnotateType => new Attr(handle),
        CX_AttrKind_ArmAgnostic => new Attr(handle),
        CX_AttrKind_ArmIn => new Attr(handle),
        CX_AttrKind_ArmInOut => new Attr(handle),
        CX_AttrKind_ArmMveStrictPolymorphism => new Attr(handle),
        CX_AttrKind_ArmOut => new Attr(handle),
        CX_AttrKind_ArmPreserves => new Attr(handle),
        CX_AttrKind_ArmStreaming => new Attr(handle),
        CX_AttrKind_ArmStreamingCompatible => new Attr(handle),
        CX_AttrKind_BTFTypeTag => new Attr(handle),
        CX_AttrKind_Blocking => new Attr(handle),
        CX_AttrKind_CmseNSCall => new Attr(handle),
        CX_AttrKind_HLSLContainedType => new Attr(handle),
        CX_AttrKind_HLSLGroupSharedAddressSpace => new Attr(handle),
        CX_AttrKind_HLSLROV => new Attr(handle),
        CX_AttrKind_HLSLRawBuffer => new Attr(handle),
        CX_AttrKind_HLSLResourceClass => new Attr(handle),
        CX_AttrKind_NoDeref => new Attr(handle),
        CX_AttrKind_NonAllocating => new Attr(handle),
        CX_AttrKind_NonBlocking => new Attr(handle),
        CX_AttrKind_ObjCGC => new Attr(handle),
        CX_AttrKind_ObjCInertUnsafeUnretained => new Attr(handle),
        CX_AttrKind_ObjCKindOf => new Attr(handle),
        CX_AttrKind_OpenCLConstantAddressSpace => new Attr(handle),
        CX_AttrKind_OpenCLGenericAddressSpace => new Attr(handle),
        CX_AttrKind_OpenCLGlobalAddressSpace => new Attr(handle),
        CX_AttrKind_OpenCLGlobalDeviceAddressSpace => new Attr(handle),
        CX_AttrKind_OpenCLGlobalHostAddressSpace => new Attr(handle),
        CX_AttrKind_OpenCLLocalAddressSpace => new Attr(handle),
        CX_AttrKind_OpenCLPrivateAddressSpace => new Attr(handle),
        CX_AttrKind_Ptr32 => new Attr(handle),
        CX_AttrKind_Ptr64 => new Attr(handle),
        CX_AttrKind_SPtr => new Attr(handle),
        CX_AttrKind_TypeNonNull => new Attr(handle),
        CX_AttrKind_TypeNullUnspecified => new Attr(handle),
        CX_AttrKind_TypeNullableResult => new Attr(handle),
        CX_AttrKind_UPtr => new Attr(handle),
        CX_AttrKind_WebAssemblyFuncref => new Attr(handle),
        CX_AttrKind_CXXAssume => new Attr(handle),
        CX_AttrKind_CodeAlign => new Attr(handle),
        CX_AttrKind_FallThrough => new Attr(handle),
        CX_AttrKind_HLSLControlFlowHint => new Attr(handle),
        CX_AttrKind_HLSLLoopHint => new Attr(handle),
        CX_AttrKind_Likely => new Attr(handle),
        CX_AttrKind_MustTail => new Attr(handle),
        CX_AttrKind_OpenCLUnrollHint => new Attr(handle),
        CX_AttrKind_Unlikely => new Attr(handle),
        CX_AttrKind_AlwaysInline => new Attr(handle),
        CX_AttrKind_NoInline => new Attr(handle),
        CX_AttrKind_NoMerge => new Attr(handle),
        CX_AttrKind_Suppress => new Attr(handle),
        CX_AttrKind_AArch64SVEPcs => new Attr(handle),
        CX_AttrKind_AArch64VectorPcs => new Attr(handle),
        CX_AttrKind_AMDGPUKernelCall => new Attr(handle),
        CX_AttrKind_AcquireHandle => new Attr(handle),
        CX_AttrKind_AnyX86NoCfCheck => new Attr(handle),
        CX_AttrKind_CDecl => new Attr(handle),
        CX_AttrKind_CountedBy => new Attr(handle),
        CX_AttrKind_CountedByOrNull => new Attr(handle),
        CX_AttrKind_FastCall => new Attr(handle),
        CX_AttrKind_IntelOclBicc => new Attr(handle),
        CX_AttrKind_LifetimeBound => new Attr(handle),
        CX_AttrKind_LifetimeCaptureBy => new Attr(handle),
        CX_AttrKind_M68kRTD => new Attr(handle),
        CX_AttrKind_MSABI => new Attr(handle),
        CX_AttrKind_NSReturnsRetained => new Attr(handle),
        CX_AttrKind_ObjCOwnership => new Attr(handle),
        CX_AttrKind_Pascal => new Attr(handle),
        CX_AttrKind_Pcs => new Attr(handle),
        CX_AttrKind_PreserveAll => new Attr(handle),
        CX_AttrKind_PreserveMost => new Attr(handle),
        CX_AttrKind_PreserveNone => new Attr(handle),
        CX_AttrKind_RISCVVectorCC => new Attr(handle),
        CX_AttrKind_RegCall => new Attr(handle),
        CX_AttrKind_SizedBy => new Attr(handle),
        CX_AttrKind_SizedByOrNull => new Attr(handle),
        CX_AttrKind_StdCall => new Attr(handle),
        CX_AttrKind_SwiftAsyncCall => new Attr(handle),
        CX_AttrKind_SwiftAttr => new Attr(handle),
        CX_AttrKind_SwiftCall => new Attr(handle),
        CX_AttrKind_SysVABI => new Attr(handle),
        CX_AttrKind_ThisCall => new Attr(handle),
        CX_AttrKind_TypeNullable => new Attr(handle),
        CX_AttrKind_VectorCall => new Attr(handle),
        CX_AttrKind_Annotate => new Attr(handle),
        CX_AttrKind_HLSLParamModifier => new Attr(handle),
        CX_AttrKind_SwiftAsyncContext => new Attr(handle),
        CX_AttrKind_SwiftContext => new Attr(handle),
        CX_AttrKind_SwiftErrorResult => new Attr(handle),
        CX_AttrKind_SwiftIndirectResult => new Attr(handle),
        CX_AttrKind_CFConsumed => new Attr(handle),
        CX_AttrKind_CarriesDependency => new Attr(handle),
        CX_AttrKind_NSConsumed => new Attr(handle),
        CX_AttrKind_NonNull => new Attr(handle),
        CX_AttrKind_OSConsumed => new Attr(handle),
        CX_AttrKind_PassObjectSize => new Attr(handle),
        CX_AttrKind_ReleaseHandle => new Attr(handle),
        CX_AttrKind_UseHandle => new Attr(handle),
        CX_AttrKind_HLSLPackOffset => new Attr(handle),
        CX_AttrKind_HLSLSV_DispatchThreadID => new Attr(handle),
        CX_AttrKind_HLSLSV_GroupID => new Attr(handle),
        CX_AttrKind_HLSLSV_GroupIndex => new Attr(handle),
        CX_AttrKind_HLSLSV_GroupThreadID => new Attr(handle),
        CX_AttrKind_AMDGPUFlatWorkGroupSize => new Attr(handle),
        CX_AttrKind_AMDGPUMaxNumWorkGroups => new Attr(handle),
        CX_AttrKind_AMDGPUNumSGPR => new Attr(handle),
        CX_AttrKind_AMDGPUNumVGPR => new Attr(handle),
        CX_AttrKind_AMDGPUWavesPerEU => new Attr(handle),
        CX_AttrKind_ARMInterrupt => new Attr(handle),
        CX_AttrKind_AVRInterrupt => new Attr(handle),
        CX_AttrKind_AVRSignal => new Attr(handle),
        CX_AttrKind_AcquireCapability => new Attr(handle),
        CX_AttrKind_AcquiredAfter => new Attr(handle),
        CX_AttrKind_AcquiredBefore => new Attr(handle),
        CX_AttrKind_AlignMac68k => new Attr(handle),
        CX_AttrKind_AlignNatural => new Attr(handle),
        CX_AttrKind_Aligned => new Attr(handle),
        CX_AttrKind_AllocAlign => new Attr(handle),
        CX_AttrKind_AllocSize => new Attr(handle),
        CX_AttrKind_AlwaysDestroy => new Attr(handle),
        CX_AttrKind_AnalyzerNoReturn => new Attr(handle),
        CX_AttrKind_AnyX86Interrupt => new Attr(handle),
        CX_AttrKind_AnyX86NoCallerSavedRegisters => new Attr(handle),
        CX_AttrKind_ArcWeakrefUnavailable => new Attr(handle),
        CX_AttrKind_ArgumentWithTypeTag => new Attr(handle),
        CX_AttrKind_ArmBuiltinAlias => new Attr(handle),
        CX_AttrKind_ArmLocallyStreaming => new Attr(handle),
        CX_AttrKind_ArmNew => new Attr(handle),
        CX_AttrKind_Artificial => new Attr(handle),
        CX_AttrKind_AsmLabel => new Attr(handle),
        CX_AttrKind_AssertCapability => new Attr(handle),
        CX_AttrKind_AssertExclusiveLock => new Attr(handle),
        CX_AttrKind_AssertSharedLock => new Attr(handle),
        CX_AttrKind_AssumeAligned => new Attr(handle),
        CX_AttrKind_Availability => new Attr(handle),
        CX_AttrKind_AvailableOnlyInDefaultEvalMethod => new Attr(handle),
        CX_AttrKind_BPFFastCall => new Attr(handle),
        CX_AttrKind_BPFPreserveAccessIndex => new Attr(handle),
        CX_AttrKind_BPFPreserveStaticOffset => new Attr(handle),
        CX_AttrKind_BTFDeclTag => new Attr(handle),
        CX_AttrKind_Blocks => new Attr(handle),
        CX_AttrKind_Builtin => new Attr(handle),
        CX_AttrKind_C11NoReturn => new Attr(handle),
        CX_AttrKind_CFAuditedTransfer => new Attr(handle),
        CX_AttrKind_CFGuard => new Attr(handle),
        CX_AttrKind_CFICanonicalJumpTable => new Attr(handle),
        CX_AttrKind_CFReturnsNotRetained => new Attr(handle),
        CX_AttrKind_CFReturnsRetained => new Attr(handle),
        CX_AttrKind_CFUnknownTransfer => new Attr(handle),
        CX_AttrKind_CPUDispatch => new Attr(handle),
        CX_AttrKind_CPUSpecific => new Attr(handle),
        CX_AttrKind_CUDAConstant => new Attr(handle),
        CX_AttrKind_CUDADevice => new Attr(handle),
        CX_AttrKind_CUDADeviceBuiltinSurfaceType => new Attr(handle),
        CX_AttrKind_CUDADeviceBuiltinTextureType => new Attr(handle),
        CX_AttrKind_CUDAGlobal => new Attr(handle),
        CX_AttrKind_CUDAGridConstant => new Attr(handle),
        CX_AttrKind_CUDAHost => new Attr(handle),
        CX_AttrKind_CUDAInvalidTarget => new Attr(handle),
        CX_AttrKind_CUDALaunchBounds => new Attr(handle),
        CX_AttrKind_CUDAShared => new Attr(handle),
        CX_AttrKind_CXX11NoReturn => new Attr(handle),
        CX_AttrKind_CallableWhen => new Attr(handle),
        CX_AttrKind_Callback => new Attr(handle),
        CX_AttrKind_Capability => new Attr(handle),
        CX_AttrKind_CapturedRecord => new Attr(handle),
        CX_AttrKind_Cleanup => new Attr(handle),
        CX_AttrKind_ClspvLibclcBuiltin => new Attr(handle),
        CX_AttrKind_CmseNSEntry => new Attr(handle),
        CX_AttrKind_CodeModel => new Attr(handle),
        CX_AttrKind_CodeSeg => new Attr(handle),
        CX_AttrKind_Cold => new Attr(handle),
        CX_AttrKind_Common => new Attr(handle),
        CX_AttrKind_Const => new Attr(handle),
        CX_AttrKind_ConstInit => new Attr(handle),
        CX_AttrKind_Constructor => new Attr(handle),
        CX_AttrKind_Consumable => new Attr(handle),
        CX_AttrKind_ConsumableAutoCast => new Attr(handle),
        CX_AttrKind_ConsumableSetOnRead => new Attr(handle),
        CX_AttrKind_Convergent => new Attr(handle),
        CX_AttrKind_CoroAwaitElidable => new Attr(handle),
        CX_AttrKind_CoroAwaitElidableArgument => new Attr(handle),
        CX_AttrKind_CoroDisableLifetimeBound => new Attr(handle),
        CX_AttrKind_CoroLifetimeBound => new Attr(handle),
        CX_AttrKind_CoroOnlyDestroyWhenComplete => new Attr(handle),
        CX_AttrKind_CoroReturnType => new Attr(handle),
        CX_AttrKind_CoroWrapper => new Attr(handle),
        CX_AttrKind_DLLExport => new Attr(handle),
        CX_AttrKind_DLLExportStaticLocal => new Attr(handle),
        CX_AttrKind_DLLImport => new Attr(handle),
        CX_AttrKind_DLLImportStaticLocal => new Attr(handle),
        CX_AttrKind_Deprecated => new Attr(handle),
        CX_AttrKind_Destructor => new Attr(handle),
        CX_AttrKind_DiagnoseAsBuiltin => new Attr(handle),
        CX_AttrKind_DiagnoseIf => new Attr(handle),
        CX_AttrKind_DisableSanitizerInstrumentation => new Attr(handle),
        CX_AttrKind_DisableTailCalls => new Attr(handle),
        CX_AttrKind_EmptyBases => new Attr(handle),
        CX_AttrKind_EnableIf => new Attr(handle),
        CX_AttrKind_EnforceTCB => new Attr(handle),
        CX_AttrKind_EnforceTCBLeaf => new Attr(handle),
        CX_AttrKind_EnumExtensibility => new Attr(handle),
        CX_AttrKind_Error => new Attr(handle),
        CX_AttrKind_ExcludeFromExplicitInstantiation => new Attr(handle),
        CX_AttrKind_ExclusiveTrylockFunction => new Attr(handle),
        CX_AttrKind_ExplicitInit => new Attr(handle),
        CX_AttrKind_ExternalSourceSymbol => new Attr(handle),
        CX_AttrKind_Final => new Attr(handle),
        CX_AttrKind_FlagEnum => new Attr(handle),
        CX_AttrKind_Flatten => new Attr(handle),
        CX_AttrKind_Format => new Attr(handle),
        CX_AttrKind_FormatArg => new Attr(handle),
        CX_AttrKind_FunctionReturnThunks => new Attr(handle),
        CX_AttrKind_GNUInline => new Attr(handle),
        CX_AttrKind_GuardedBy => new Attr(handle),
        CX_AttrKind_GuardedVar => new Attr(handle),
        CX_AttrKind_HIPManaged => new Attr(handle),
        CX_AttrKind_HLSLNumThreads => new Attr(handle),
        CX_AttrKind_HLSLResource => new Attr(handle),
        CX_AttrKind_HLSLResourceBinding => new Attr(handle),
        CX_AttrKind_HLSLShader => new Attr(handle),
        CX_AttrKind_HLSLWaveSize => new Attr(handle),
        CX_AttrKind_Hot => new Attr(handle),
        CX_AttrKind_HybridPatchable => new Attr(handle),
        CX_AttrKind_IBAction => new Attr(handle),
        CX_AttrKind_IBOutlet => new Attr(handle),
        CX_AttrKind_IBOutletCollection => new Attr(handle),
        CX_AttrKind_InitPriority => new Attr(handle),
        CX_AttrKind_InternalLinkage => new Attr(handle),
        CX_AttrKind_LTOVisibilityPublic => new Attr(handle),
        CX_AttrKind_LayoutVersion => new Attr(handle),
        CX_AttrKind_Leaf => new Attr(handle),
        CX_AttrKind_LockReturned => new Attr(handle),
        CX_AttrKind_LocksExcluded => new Attr(handle),
        CX_AttrKind_M68kInterrupt => new Attr(handle),
        CX_AttrKind_MIGServerRoutine => new Attr(handle),
        CX_AttrKind_MSAllocator => new Attr(handle),
        CX_AttrKind_MSConstexpr => new Attr(handle),
        CX_AttrKind_MSInheritance => new Attr(handle),
        CX_AttrKind_MSNoVTable => new Attr(handle),
        CX_AttrKind_MSP430Interrupt => new Attr(handle),
        CX_AttrKind_MSStruct => new Attr(handle),
        CX_AttrKind_MSVtorDisp => new Attr(handle),
        CX_AttrKind_MaxFieldAlignment => new Attr(handle),
        CX_AttrKind_MayAlias => new Attr(handle),
        CX_AttrKind_MaybeUndef => new Attr(handle),
        CX_AttrKind_MicroMips => new Attr(handle),
        CX_AttrKind_MinSize => new Attr(handle),
        CX_AttrKind_MinVectorWidth => new Attr(handle),
        CX_AttrKind_Mips16 => new Attr(handle),
        CX_AttrKind_MipsInterrupt => new Attr(handle),
        CX_AttrKind_MipsLongCall => new Attr(handle),
        CX_AttrKind_MipsShortCall => new Attr(handle),
        CX_AttrKind_NSConsumesSelf => new Attr(handle),
        CX_AttrKind_NSErrorDomain => new Attr(handle),
        CX_AttrKind_NSReturnsAutoreleased => new Attr(handle),
        CX_AttrKind_NSReturnsNotRetained => new Attr(handle),
        CX_AttrKind_NVPTXKernel => new Attr(handle),
        CX_AttrKind_Naked => new Attr(handle),
        CX_AttrKind_NoAlias => new Attr(handle),
        CX_AttrKind_NoCommon => new Attr(handle),
        CX_AttrKind_NoConvergent => new Attr(handle),
        CX_AttrKind_NoDebug => new Attr(handle),
        CX_AttrKind_NoDestroy => new Attr(handle),
        CX_AttrKind_NoDuplicate => new Attr(handle),
        CX_AttrKind_NoInstrumentFunction => new Attr(handle),
        CX_AttrKind_NoMicroMips => new Attr(handle),
        CX_AttrKind_NoMips16 => new Attr(handle),
        CX_AttrKind_NoProfileFunction => new Attr(handle),
        CX_AttrKind_NoRandomizeLayout => new Attr(handle),
        CX_AttrKind_NoReturn => new Attr(handle),
        CX_AttrKind_NoSanitize => new Attr(handle),
        CX_AttrKind_NoSpecializations => new Attr(handle),
        CX_AttrKind_NoSpeculativeLoadHardening => new Attr(handle),
        CX_AttrKind_NoSplitStack => new Attr(handle),
        CX_AttrKind_NoStackProtector => new Attr(handle),
        CX_AttrKind_NoThreadSafetyAnalysis => new Attr(handle),
        CX_AttrKind_NoThrow => new Attr(handle),
        CX_AttrKind_NoTrivialAutoVarInit => new Attr(handle),
        CX_AttrKind_NoUniqueAddress => new Attr(handle),
        CX_AttrKind_NoUwtable => new Attr(handle),
        CX_AttrKind_NotTailCalled => new Attr(handle),
        CX_AttrKind_OMPAllocateDecl => new Attr(handle),
        CX_AttrKind_OMPAssume => new Attr(handle),
        CX_AttrKind_OMPCaptureNoInit => new Attr(handle),
        CX_AttrKind_OMPDeclareTargetDecl => new Attr(handle),
        CX_AttrKind_OMPDeclareVariant => new Attr(handle),
        CX_AttrKind_OMPThreadPrivateDecl => new Attr(handle),
        CX_AttrKind_OSConsumesThis => new Attr(handle),
        CX_AttrKind_OSReturnsNotRetained => new Attr(handle),
        CX_AttrKind_OSReturnsRetained => new Attr(handle),
        CX_AttrKind_OSReturnsRetainedOnNonZero => new Attr(handle),
        CX_AttrKind_OSReturnsRetainedOnZero => new Attr(handle),
        CX_AttrKind_ObjCBridge => new Attr(handle),
        CX_AttrKind_ObjCBridgeMutable => new Attr(handle),
        CX_AttrKind_ObjCBridgeRelated => new Attr(handle),
        CX_AttrKind_ObjCException => new Attr(handle),
        CX_AttrKind_ObjCExplicitProtocolImpl => new Attr(handle),
        CX_AttrKind_ObjCExternallyRetained => new Attr(handle),
        CX_AttrKind_ObjCIndependentClass => new Attr(handle),
        CX_AttrKind_ObjCMethodFamily => new Attr(handle),
        CX_AttrKind_ObjCNSObject => new Attr(handle),
        CX_AttrKind_ObjCPreciseLifetime => new Attr(handle),
        CX_AttrKind_ObjCRequiresPropertyDefs => new Attr(handle),
        CX_AttrKind_ObjCRequiresSuper => new Attr(handle),
        CX_AttrKind_ObjCReturnsInnerPointer => new Attr(handle),
        CX_AttrKind_ObjCRootClass => new Attr(handle),
        CX_AttrKind_ObjCSubclassingRestricted => new Attr(handle),
        CX_AttrKind_OpenCLIntelReqdSubGroupSize => new Attr(handle),
        CX_AttrKind_OpenCLKernel => new Attr(handle),
        CX_AttrKind_OptimizeNone => new Attr(handle),
        CX_AttrKind_Override => new Attr(handle),
        CX_AttrKind_Owner => new Attr(handle),
        CX_AttrKind_Ownership => new Attr(handle),
        CX_AttrKind_Packed => new Attr(handle),
        CX_AttrKind_ParamTypestate => new Attr(handle),
        CX_AttrKind_PatchableFunctionEntry => new Attr(handle),
        CX_AttrKind_Pointer => new Attr(handle),
        CX_AttrKind_PragmaClangBSSSection => new Attr(handle),
        CX_AttrKind_PragmaClangDataSection => new Attr(handle),
        CX_AttrKind_PragmaClangRelroSection => new Attr(handle),
        CX_AttrKind_PragmaClangRodataSection => new Attr(handle),
        CX_AttrKind_PragmaClangTextSection => new Attr(handle),
        CX_AttrKind_PreferredName => new Attr(handle),
        CX_AttrKind_PreferredType => new Attr(handle),
        CX_AttrKind_PtGuardedBy => new Attr(handle),
        CX_AttrKind_PtGuardedVar => new Attr(handle),
        CX_AttrKind_Pure => new Attr(handle),
        CX_AttrKind_RISCVInterrupt => new Attr(handle),
        CX_AttrKind_RandomizeLayout => new Attr(handle),
        CX_AttrKind_ReadOnlyPlacement => new Attr(handle),
        CX_AttrKind_Reinitializes => new Attr(handle),
        CX_AttrKind_ReleaseCapability => new Attr(handle),
        CX_AttrKind_ReqdWorkGroupSize => new Attr(handle),
        CX_AttrKind_RequiresCapability => new Attr(handle),
        CX_AttrKind_Restrict => new Attr(handle),
        CX_AttrKind_Retain => new Attr(handle),
        CX_AttrKind_ReturnTypestate => new Attr(handle),
        CX_AttrKind_ReturnsNonNull => new Attr(handle),
        CX_AttrKind_ReturnsTwice => new Attr(handle),
        CX_AttrKind_SYCLKernel => new Attr(handle),
        CX_AttrKind_SYCLKernelEntryPoint => new Attr(handle),
        CX_AttrKind_SYCLSpecialClass => new Attr(handle),
        CX_AttrKind_ScopedLockable => new Attr(handle),
        CX_AttrKind_Section => new Attr(handle),
        CX_AttrKind_SelectAny => new Attr(handle),
        CX_AttrKind_Sentinel => new Attr(handle),
        CX_AttrKind_SetTypestate => new Attr(handle),
        CX_AttrKind_SharedTrylockFunction => new Attr(handle),
        CX_AttrKind_SpeculativeLoadHardening => new Attr(handle),
        CX_AttrKind_StandaloneDebug => new Attr(handle),
        CX_AttrKind_StrictFP => new Attr(handle),
        CX_AttrKind_StrictGuardStackCheck => new Attr(handle),
        CX_AttrKind_SwiftAsync => new Attr(handle),
        CX_AttrKind_SwiftAsyncError => new Attr(handle),
        CX_AttrKind_SwiftAsyncName => new Attr(handle),
        CX_AttrKind_SwiftBridge => new Attr(handle),
        CX_AttrKind_SwiftBridgedTypedef => new Attr(handle),
        CX_AttrKind_SwiftError => new Attr(handle),
        CX_AttrKind_SwiftImportAsNonGeneric => new Attr(handle),
        CX_AttrKind_SwiftImportPropertyAsAccessors => new Attr(handle),
        CX_AttrKind_SwiftName => new Attr(handle),
        CX_AttrKind_SwiftNewType => new Attr(handle),
        CX_AttrKind_SwiftPrivate => new Attr(handle),
        CX_AttrKind_TLSModel => new Attr(handle),
        CX_AttrKind_Target => new Attr(handle),
        CX_AttrKind_TargetClones => new Attr(handle),
        CX_AttrKind_TargetVersion => new Attr(handle),
        CX_AttrKind_TestTypestate => new Attr(handle),
        CX_AttrKind_TransparentUnion => new Attr(handle),
        CX_AttrKind_TrivialABI => new Attr(handle),
        CX_AttrKind_TryAcquireCapability => new Attr(handle),
        CX_AttrKind_TypeTagForDatatype => new Attr(handle),
        CX_AttrKind_TypeVisibility => new Attr(handle),
        CX_AttrKind_Unavailable => new Attr(handle),
        CX_AttrKind_Uninitialized => new Attr(handle),
        CX_AttrKind_UnsafeBufferUsage => new Attr(handle),
        CX_AttrKind_Unused => new Attr(handle),
        CX_AttrKind_Used => new Attr(handle),
        CX_AttrKind_UsingIfExists => new Attr(handle),
        CX_AttrKind_Uuid => new Attr(handle),
        CX_AttrKind_VTablePointerAuthentication => new Attr(handle),
        CX_AttrKind_VecReturn => new Attr(handle),
        CX_AttrKind_VecTypeHint => new Attr(handle),
        CX_AttrKind_Visibility => new Attr(handle),
        CX_AttrKind_WarnUnused => new Attr(handle),
        CX_AttrKind_WarnUnusedResult => new Attr(handle),
        CX_AttrKind_Weak => new Attr(handle),
        CX_AttrKind_WeakImport => new Attr(handle),
        CX_AttrKind_WeakRef => new Attr(handle),
        CX_AttrKind_WebAssemblyExportName => new Attr(handle),
        CX_AttrKind_WebAssemblyImportModule => new Attr(handle),
        CX_AttrKind_WebAssemblyImportName => new Attr(handle),
        CX_AttrKind_WorkGroupSizeHint => new Attr(handle),
        CX_AttrKind_X86ForceAlignArgPointer => new Attr(handle),
        CX_AttrKind_XRayInstrument => new Attr(handle),
        CX_AttrKind_XRayLogArgs => new Attr(handle),
        CX_AttrKind_ZeroCallUsedRegs => new Attr(handle),
        CX_AttrKind_AbiTag => new Attr(handle),
        CX_AttrKind_Alias => new Attr(handle),
        CX_AttrKind_AlignValue => new Attr(handle),
        CX_AttrKind_BuiltinAlias => new Attr(handle),
        CX_AttrKind_CalledOnce => new Attr(handle),
        CX_AttrKind_IFunc => new Attr(handle),
        CX_AttrKind_InitSeg => new Attr(handle),
        CX_AttrKind_LoaderUninitialized => new Attr(handle),
        CX_AttrKind_LoopHint => new Attr(handle),
        CX_AttrKind_Mode => new Attr(handle),
        CX_AttrKind_NoBuiltin => new Attr(handle),
        CX_AttrKind_NoEscape => new Attr(handle),
        CX_AttrKind_OMPCaptureKind => new Attr(handle),
        CX_AttrKind_OMPDeclareSimdDecl => new Attr(handle),
        CX_AttrKind_OMPReferencedVar => new Attr(handle),
        CX_AttrKind_ObjCBoxable => new Attr(handle),
        CX_AttrKind_ObjCClassStub => new Attr(handle),
        CX_AttrKind_ObjCDesignatedInitializer => new Attr(handle),
        CX_AttrKind_ObjCDirect => new Attr(handle),
        CX_AttrKind_ObjCDirectMembers => new Attr(handle),
        CX_AttrKind_ObjCNonLazyClass => new Attr(handle),
        CX_AttrKind_ObjCNonRuntimeProtocol => new Attr(handle),
        CX_AttrKind_ObjCRuntimeName => new Attr(handle),
        CX_AttrKind_ObjCRuntimeVisible => new Attr(handle),
        CX_AttrKind_OpenCLAccess => new Attr(handle),
        CX_AttrKind_Overloadable => new Attr(handle),
        CX_AttrKind_SwiftObjCMembers => new Attr(handle),
        CX_AttrKind_SwiftVersionedAddition => new Attr(handle),
        CX_AttrKind_SwiftVersionedRemoval => new Attr(handle),
        CX_AttrKind_Thread => new Attr(handle),
        _ => new Attr(handle),
    };

    public bool IsImplicit => Handle.IsImplicit;

    public bool IsPackExpansion => Handle.IsPackExpansion;

    public CX_AttrKind Kind => Handle.AttrKind;

    public string KindSpelling => Handle.AttrKindSpelling;
}
